//
//  SelfSizeTools.m
//  22-HomeWork
//
//  Created by GivenBmli on 16/8/13.
//  Copyright © 2016年 GivenBmli. All rights reserved.
//

#import "SelfSizeTools.h"

@implementation SelfSizeTools
+ (CGFloat)selfSizeHeightWithString:(NSString *)string Width:(CGFloat)width Font:(UIFont *)font {
    CGRect newRect = [string boundingRectWithSize:CGSizeMake(0, width) options:NSStringDrawingUsesLineFragmentOrigin attributes:@{NSFontAttributeName : font} context:nil];
    return newRect.size.width;
}

@end
